package com.example.cxx.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Integer code;
    private Object data;
    private String message;
    public static Result error(String message){
        return new Result(0,null,message);
    }
    public static  Result success(Object o){
        return new Result(1,o,"success");
    }
    public static  Result success(Object o,String message){
        return new Result(1,o,message);
    }
    public static  Result success(){
        return new Result(1,null,"success");
    }
}
